home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1994 / MacHack 1994.toast / MacHack™94 / Talks & Papers / Timothy Knox / yerk 3.66 / resmenus < prev    next >
Text File  |  1994-06-24  |  1KB  |  23 lines

  1. \ If you don't want to use the menu loader supplied with Yerk, you may add
  2. \ your menus to your resource file. Use this code as an example to load the
  3. \ standard Yerk menu from a resource file.  You may test this code by using
  4. \ the resource editor ResEdit to copy the menu resources in the file 'menus'
  5. \ into the 'yerk.rsrc' file. Then load the code into Yerk.com and try the new
  6. \ word nmenu. 
  7.  
  8. \ stuff handlers into menus -  this is done at compile time
  9.  
  10.  2 'cfas about null                                                    1 put: appleMen
  11.  5 'cfas stdLoad doSave stdSave Print bye                            2 put: fileMen
  12.  8 'cfas null null sysCut sysCopy sysPaste sysClear null doEdit        3 put: editMen
  13.  9 'cfas doWords doOlist doClist hier exam doDe doGrep null install    4 put: utilMen
  14.  9 'cfas pEcho lEcho null .path .room doMlist purge    null null        5 put: yerkMen
  15.  
  16. clear: menubar
  17. draw: menubar
  18.  
  19. \ note that you have to release the applemen, since each time you insert it,
  20. \  the items are added to the menu. Without releasing first, you will wind up
  21. \  with a big repetitive list in the applemen.
  22. : nmenu release: applemen applemen fileMen editMen utilMen yerkMen 5 init: menubar ;
  23.